//
//  MD5Encrypt.h
//  LoveXinZheng
//
//  Created by 刘长兴 on 2017/3/30.
//  Copyright © 2017年 刘长兴. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MD5Encrypt : NSObject
// MD5加密
/*
 *由于MD5加密是不可逆的,多用来进行验证
 */
// 32位小写
+(NSString *)MD5ForLower32Bate:(NSString *)str;
// 32位大写
+(NSString *)MD5ForUpper32Bate:(NSString *)str;
// 16为大写
+(NSString *)MD5ForUpper16Bate:(NSString *)str;
// 16位小写
+(NSString *)MD5ForLower16Bate:(NSString *)str;

//base64编码
+ (NSString *)Base64String:(NSString *)str;
//base64 解码
+ (NSString *)stringFromBase64:(NSString *)str;




// 正则判断手机号码地址格式
+ (BOOL)isMobileNumber:(NSString *)mobileNum;

//邮箱
+ (BOOL) validateEmail:(NSString *)email;

//手机号码验证
+ (BOOL) validateMobile:(NSString *)mobile;

//用户名
+ (BOOL) validateUserName:(NSString *)name;


//sha1加密方式
+ (NSString *)getSha1String:(NSString *)srcString;

//判断数据的字段是手机号,还是用户名,还是邮箱
+ (void)testUserName:(NSString *)str
            finished:(void(^)(NSInteger index , NSString * desc))block;


/**
 是否全数字

 @param string 字符串
 @return 返回结果
 */
+ (BOOL)isPureInt:(NSString*)string;


+(BOOL) validatePwd:(NSString *)pwd;



@end
